//
//  CLConstantsView.m
//  MasonryTest
//
//  Created by Charles on 16/9/23.
//  Copyright © 2016年 Charles. All rights reserved.
//

#import "CLConstantsView.h"

@implementation CLConstantsView

- (instancetype)init{
    if (self = [super init]) {
        [self makeView];
    }
    return self;
}

- (void)makeView{
    
    UIView * purpleView = UIView.new;
    purpleView.backgroundColor = [UIColor purpleColor];
    purpleView.layer.borderColor = [UIColor blackColor].CGColor;
    purpleView.layer.borderWidth = 2;
    [self addSubview:purpleView];
    
    UIView * orangeView = UIView.new;
    orangeView.backgroundColor = [UIColor orangeColor];
    orangeView.layer.borderColor = [UIColor blackColor].CGColor;
    orangeView.layer.borderWidth = 2;
    [self addSubview:orangeView];
    
    [purpleView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(@20);
        make.left.equalTo(@20);
        make.bottom.equalTo(@-20);
        make.right.equalTo(@-20);
    }];

    [orangeView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(CGPointMake(0, 50));
        make.size.equalTo(CGSizeMake(200, 100));
    }];
    
}

@end
